nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
↳ QTRS
↳ Overlay + Local Confluence
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
NTHTAIL(n, l) → COND(ge(n, length(l)), n, l)
LENGTH(cons(x, l)) → LENGTH(l)
COND(false, n, l) → NTHTAIL(s(n), l)
NTHTAIL(n, l) → GE(n, length(l))
COND(false, n, l) → TAIL(nthtail(s(n), l))
GE(s(u), s(v)) → GE(u, v)
NTHTAIL(n, l) → LENGTH(l)
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
NTHTAIL(n, l) → COND(ge(n, length(l)), n, l)
LENGTH(cons(x, l)) → LENGTH(l)
COND(false, n, l) → NTHTAIL(s(n), l)
NTHTAIL(n, l) → GE(n, length(l))
COND(false, n, l) → TAIL(nthtail(s(n), l))
GE(s(u), s(v)) → GE(u, v)
NTHTAIL(n, l) → LENGTH(l)
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
GE(s(u), s(v)) → GE(u, v)
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDP
GE(s(u), s(v)) → GE(u, v)
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
GE(s(u), s(v)) → GE(u, v)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
LENGTH(cons(x, l)) → LENGTH(l)
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
LENGTH(cons(x, l)) → LENGTH(l)
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
LENGTH(cons(x, l)) → LENGTH(l)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
NTHTAIL(n, l) → COND(ge(n, length(l)), n, l)
COND(false, n, l) → NTHTAIL(s(n), l)
nthtail(n, l) → cond(ge(n, length(l)), n, l)
cond(true, n, l) → l
cond(false, n, l) → tail(nthtail(s(n), l))
tail(nil) → nil
tail(cons(x, l)) → l
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
NTHTAIL(n, l) → COND(ge(n, length(l)), n, l)
COND(false, n, l) → NTHTAIL(s(n), l)
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
nthtail(x0, x1)
cond(true, x0, x1)
cond(false, x0, x1)
tail(nil)
tail(cons(x0, x1))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ NonInfProof
NTHTAIL(n, l) → COND(ge(n, length(l)), n, l)
COND(false, n, l) → NTHTAIL(s(n), l)
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
(1) (NTHTAIL(s(x2), x3)=NTHTAIL(x4, x5) ⇒ NTHTAIL(x4, x5)≥COND(ge(x4, length(x5)), x4, x5))
(2) (NTHTAIL(s(x2), x3)≥COND(ge(s(x2), length(x3)), s(x2), x3))
(3) (COND(ge(x6, length(x7)), x6, x7)=COND(false, x8, x9) ⇒ COND(false, x8, x9)≥NTHTAIL(s(x8), x9))
(4) (length(x7)=x12∧ge(x6, x12)=false ⇒ COND(false, x6, x7)≥NTHTAIL(s(x6), x7))
(5) (false=false∧length(x7)=s(x14) ⇒ COND(false, 0, x7)≥NTHTAIL(s(0), x7))
(6) (ge(x15, x16)=false∧length(x7)=s(x16)∧(∀x17:ge(x15, x16)=false∧length(x17)=x16 ⇒ COND(false, x15, x17)≥NTHTAIL(s(x15), x17)) ⇒ COND(false, s(x15), x7)≥NTHTAIL(s(s(x15)), x7))
(7) (length(x7)=s(x14) ⇒ COND(false, 0, x7)≥NTHTAIL(s(0), x7))
(8) (s(length(x22))=s(x16)∧ge(x15, x16)=false∧(∀x17:ge(x15, x16)=false∧length(x17)=x16 ⇒ COND(false, x15, x17)≥NTHTAIL(s(x15), x17))∧(∀x23,x24,x25:length(x22)=s(x23)∧ge(x24, x23)=false∧(∀x25:ge(x24, x23)=false∧length(x25)=x23 ⇒ COND(false, x24, x25)≥NTHTAIL(s(x24), x25)) ⇒ COND(false, s(x24), x22)≥NTHTAIL(s(s(x24)), x22)) ⇒ COND(false, s(x15), cons(x21, x22))≥NTHTAIL(s(s(x15)), cons(x21, x22)))
(9) (s(length(x19))=s(x14)∧(∀x20:length(x19)=s(x20) ⇒ COND(false, 0, x19)≥NTHTAIL(s(0), x19)) ⇒ COND(false, 0, cons(x18, x19))≥NTHTAIL(s(0), cons(x18, x19)))
(10) (COND(false, 0, cons(x18, x19))≥NTHTAIL(s(0), cons(x18, x19)))
(11) (length(x22)=x16∧ge(x15, x16)=false∧(∀x17:ge(x15, x16)=false∧length(x17)=x16 ⇒ COND(false, x15, x17)≥NTHTAIL(s(x15), x17))∧(∀x23,x24,x25:length(x22)=s(x23)∧ge(x24, x23)=false∧(∀x25:ge(x24, x23)=false∧length(x25)=x23 ⇒ COND(false, x24, x25)≥NTHTAIL(s(x24), x25)) ⇒ COND(false, s(x24), x22)≥NTHTAIL(s(s(x24)), x22)) ⇒ COND(false, s(x15), cons(x21, x22))≥NTHTAIL(s(s(x15)), cons(x21, x22)))
(12) (COND(false, x15, x22)≥NTHTAIL(s(x15), x22)∧(∀x23,x24,x25:length(x22)=s(x23)∧ge(x24, x23)=false∧(∀x25:ge(x24, x23)=false∧length(x25)=x23 ⇒ COND(false, x24, x25)≥NTHTAIL(s(x24), x25)) ⇒ COND(false, s(x24), x22)≥NTHTAIL(s(s(x24)), x22)) ⇒ COND(false, s(x15), cons(x21, x22))≥NTHTAIL(s(s(x15)), cons(x21, x22)))
(13) (COND(false, x15, x22)≥NTHTAIL(s(x15), x22) ⇒ COND(false, s(x15), cons(x21, x22))≥NTHTAIL(s(s(x15)), cons(x21, x22)))
POL(0) = 0
POL(COND(x1, x2, x3)) = -1 - x1 - x2 + x3
POL(NTHTAIL(x1, x2)) = -1 - x1 + x2
POL(c) = -2
POL(cons(x1, x2)) = 1 + x2
POL(false) = 0
POL(ge(x1, x2)) = 0
POL(length(x1)) = 0
POL(nil) = 0
POL(s(x1)) = 1 + x1
POL(true) = 0
The following pairs are in Pbound:
COND(false, n, l) → NTHTAIL(s(n), l)
The following rules are usable:
COND(false, n, l) → NTHTAIL(s(n), l)
false → ge(0, s(v))
ge(u, v) → ge(s(u), s(v))
true → ge(u, 0)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ NonInfProof
↳ QDP
↳ DependencyGraphProof
NTHTAIL(n, l) → COND(ge(n, length(l)), n, l)
length(nil) → 0
length(cons(x, l)) → s(length(l))
ge(u, 0) → true
ge(0, s(v)) → false
ge(s(u), s(v)) → ge(u, v)
length(nil)
length(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))